<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>常见属性</title>
</head>
<body>
<form method="get" action="http://localhost:8080/test1">
    用户编号:<input type="text" name="id" /><br/>
    用户姓名:<input type="text" name="username" /><br/>
    用户年龄<input type="text" name="age" /><br/>
    <input type="submit" value="submit"/>
</form>

<form th:method="post" th:action="@{/test1}">
    用户编号:<input type="text" id="id" th:name="id" /><br/>
    用户姓名:<input type="text" th:id="username" th:name="username" /><br/>
    用户年龄<input type="text" th:id="age" th:name="age" /><br/>
    <input type="submit" value="submit"/>
</form>

<script type="text/javascript">
    function test() {
        alert("-----");
    }
</script>

<button th:onclick="test()">submit111</button>
<button onclick="test()">submit222</button>

</body>
</html>